import java.util.ArrayList;
import java.util.List;
import java.util.Random;

abstract class Animal {
    String name;
    public Animal(String name) {
        this.name = name;
    }
    abstract public void makeSound();
}
class Tiger extends Animal {
    public Tiger (String name) {
        super(name);
    }
    @Override
    public void makeSound(){
        System.out.println( name +": ttiiggee");
    }
}
class Elephant extends Animal {
    public Elephant (String name) {
        super(name);
    }
    @Override
    public void makeSound(){
        System.out.println(name +": eellppaanntt");
    }
}
class Fox extends Animal {
    public Fox (String name) {
        super(name);
    }
    @Override
    public void makeSound(){
        System.out.println(name +": ffooxx");
    }
}
class Panda extends Animal {
    public Panda (String name) {
        super(name);
    }
    @Override
    public void makeSound(){
        System.out.println(name +": ppaanndd");
    }
}
public class AbstractAnimal {
    public static void main(String[] args) {
        List<Animal> animals = new ArrayList<>();
        Random random = new Random();
        for(int i = 1;i <= 10; i++){
            int animalType = random.nextInt(4);
            switch (animalType){
                case 0:
                    animals.add(new Tiger("tiger-"+i));
                    break;
                case 1:
                    animals.add(new Elephant("elephant-"+i));
                    break;
                case 2:
                    animals.add(new Fox("fox-"+i));
                    break;
                case 3:
                    animals.add(new Panda("panda-"+i));
                    break;
            }
        }
        for(Animal animal:animals){
            animal.makeSound();
        }
    }
}
